package cn.zn.modules.appoin.dao;

import cn.zn.modules.appoin.entity.AppoinTimeDetail;
import cn.zn.modules.appoin.entity.vo.AppoinDetailSummarySignNumVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AppoinTimeDetailMapper extends BaseMapper<AppoinTimeDetail> {
    List<AppoinTimeDetail> queryPage(
            @Param("tenantId") Long tenantId,
            @Param("appoinUserCode") String appoinUserCode,
            @Param("appoinDate") String appoinDate,
            @Param("appoinDateStart") String appoinDateStart,
            @Param("appoinDateEnd") String appoinDateEnd,
            @Param("isActive") Boolean isActive,
            @Param("mainId") String mainId,
            @Param("isShowNoUser") Boolean isShowNoUser,
            IPage<AppoinTimeDetail> page);

    /**
     * 统计每月预约数量
     *
     * @param userCode 用户编号
     * @param tenantId 租户
     * @param year     年度
     * @return
     */
    List<AppoinDetailSummarySignNumVO> summarySignNum(
            @Param("userCode") String userCode,
            @Param("tenantId") Long tenantId,
            @Param("year") Integer year);
}